// ; (function () { //热搜关键词
//     let $sou_zi = $('.logoer .sou_zi');
//     $.ajax({
//         url: "http://www.ujiuye.tech:3000/api/hot",
//         success: function (datas) {
//             //console.log(datas.result.data);
//             // $(datas.result.data).each(function () {//jQuery方法
//             //     $sou_zi.append('<span>' + $(this)[0].search_text + '</span>|')
//             // })   
//             let { result: { data } } = datas;
//             data.forEach(function (item) {
//                 $sou_zi.append(`<span>${item.search_text}</span>|`)
//             });
//         },
//     });
// })();
// ;(function(){ //商品详情
//     async function fn() {
//         const id = location.search.split('?')[1];
//         let [err, rst] = await to(ajax({
//             url: '/goods/detail',
//             data: id,
//         }))
//         let{data}=rst;
//         console.log(data);
//         let $one_top=$('.content_one .one_top');
//         $one_top.html(`<span>首页</span><span>&gt;</span><span>${data.first_name}</span><span>&gt;</span><span>${data.second_name}</span>
//         <span>&gt;</span><span>${data.thired_name}</span><span>&gt;</span><span>${data.goods_name}</span>`);
//         let $one_left=$('.content_one .one_left');
//         $one_left.html(`
//         <div class="l_one" style="background-image: url(${data.image_url});"></div>
//         <div class="l_two"><span class="iconfont">&#xe65b;</span></div>
//         <div class="l_three"><span class="span_1">&lt;</span><span class="span_2" style="background-image: url(${data.imgList[0].file_name});" ></span><span
//                 class="span_3" style="background-image: url(${data.imgList[1].file_name});" ></span><span class="span_4" style="background-image: url(${data.imgList[2].file_name});" ></span><span class="span_5" style="background-image: url(${data.imgList[3].file_name});" ></span><span
//                 class="span_6" style="background-image: url(${data.imgList[4].file_name});" ></span><span class="span_7">&gt;</span></div>
//         `)
//         let $spans=$('.one_left .l_three>span');
//         //console.log($spans);
//         for(let i=1;i<$spans.length-1;i++){
//            $($spans[i]).click(()=>{
//             $($('.one_left .l_one')[0]).css('backgroundImage',`url(${data.imgList[i-1].file_name})`);
//            })
//         }
//         let $r_one=$('.one_right .r_one');
//         $r_one.html(`<p>${data.goods_name}</p>`);
//         let $r_two=$('.one_right .r_two');
//         $r_two.html(`<span>${data.goods_introduce}</span> <a href="">点击查看活动详情！</a>`);
//         let $r_three=$('.one_right .r_three');
//         $r_three.html(`
//         <div class="jiage_1"><span class="span_6">促&nbsp;销&nbsp;价</span><span class="span_1">&yen;</span><span
//                         class="span_2">${data.goods_price}</span><span class="span_3">降价通知</span><span class="span_4"></span><span
//                         class="span_7"><span class="iconfont">&#xe501;</span><span>收藏</span></span></div>
//                 <div class="jiage_2"><span class="span_6">累计评价</span><span class="span_5"><ins>${data.evalList.length}+</ins></span></div>
//                 <div class="jiage_3"><span class="span_6">运&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;费</span>满19包邮</div>
//         `);
//         let $r_four=$('.one_right .r_four');
//         $r_four.html(`
//         <span class="span_1">${data.styleList[0].style_name}</span>
//         <span class="span_2">${data.styleList[0].style_value}</span> 
//         `)

//         let $top_two=$('.two_right .top_two');
//         $top_two.html(`${data.goods_detailed_information}`);
//     } 
//     fn();
// })();
// ; (function () { //商品推荐
//     let $l_ul = $('.content_two .two_left .l_bott>ul');
//     async function fn() {
//         const id = location.search.split('?')[1];
//         let [err, rst] = await to(ajax({
//             url: '/goods/shopwindow',
//         }))
//         let{data}=rst;
//         let str='';
//        data.forEach((item,index)=>{
//          str+=`
//          <li>
//              <div class="tu" style="background-image: url(${data[index].image_url});"></div>
//              <div class="jianjie">
//              <div class="jianjie_1">${data[index].goods_name}</div>
//             </div>
//             <div class="jiage"><span class="jiage_01">&yen;</span> <span>${data[index].goods_price}</span></div>
//         </li> 
//          `
//        });
//        $l_ul.html(str)
//     }
//     fn();
// })();
